import com.ls.fw.config.zookeeper.ZookeeperClientFactory;
import com.ls.fw.config.zookeeper.ZookeeperProperties;
import com.ls.fw.config.zookeeper.beans.CommandConstEnum;
import com.ls.fw.config.zookeeper.beans.WordsCommand;
import com.ls.fw.config.zookeeper.beans.ZkServerInfo;
import com.ls.fw.config.zookeeper.utils.ZkServerUtils;

public class Main {

	public static void main(String[] args) throws Exception {
		ZookeeperProperties p = new ZookeeperProperties();
		ZookeeperClientFactory f = new ZookeeperClientFactory();
		ZkServerInfo info = new ZkServerInfo();
		info.setIp("127.0.0.1");
		info.setPort(2181);
		System.out.println(ZkServerUtils.initServerInfo(info ));
		String[] strs = WordsCommand.getResultArray(info, CommandConstEnum.WCHC);
		for (String string : strs) {
			System.out.println(string);
		}
		strs = WordsCommand.getResultArray(info, CommandConstEnum.STAT);
		for (String string : strs) {
			System.out.println(string);
		}
	}
}
